<template>
  <div class="tree-container">
    <router-link to="/">
      <button>跳转到Home</button>
    </router-link>
    <ul>
      <tree-item class="item" :model="treeData"></tree-item>
    </ul>
  </div>
</template>
<script>
import TreeItem from "@/components/Tree/index";
export default {
  name: "Tree",
  data() {
    return {
      treeData: {
        title: "Web全栈架构师",
        children: [
          {
            title: "Java架构师"
          },
          {
            title: "JS高级",
            children: [
              {
                title: "ES6"
              },
              {
                title: "动效"
              }
            ]
          },
          {
            title: "Web全栈",
            children: [
              {
                title: "Vue训练营",
                expand: true,
                children: [
                  {
                    title: "组件化"
                  },
                  {
                    title: "源码"
                  },
                  {
                    title: "docker部署"
                  }
                ]
              },
              {
                title: "React",
                children: [
                  {
                    title: "JSX"
                  },
                  {
                    title: "虚拟DOM"
                  }
                ]
              },
              {
                title: "Node"
              }
            ]
          }
        ]
      }
    };
  },
  components: { TreeItem }
};
</script>
